Status: In progress — worker built, 2 of 5 pages done
Last commit: 9a563c2
Last updated: April 2026
White-label subdomain for Newrise Learning Sdn Bhd (Joshua Sew), distributing Sales For Technical People via HRDC grant path only. Enquiry → proforma + schedule auto-sent to client → Joshua alerted → Joshua follows up → formal invoice issued by Newrise.
| Decision | Value |
|---|---|
| D1 | Per-reseller — newrise-db |
| KV | Per-reseller — newrise-kv |
| R2 | Per-reseller — newrise-assets |
| Pages project | Separate — newrise-sales-training |
| Repo path | resellers/newrise/sales-training/ |
| Subdomain | newrise.claritysystems.work |
| HRDC paths | Grant only |
| SST | 8% — P11-1902-32000013 |
| Invoice prefix | NR- |
| First invoice | NR-1002704 |
| KV counter seed | 1002703 (worker increments before issuing) |
| Joshua alert email | [email protected] |
| Training Programme No | Placeholder 1xx-xx-xx on invoice — update via KV when HRDC confirms |
| Payment | Maybank — Newrise Learning Sdn Bhd — 5070 9567 8082 |
| Worker URL | newrise-enquiry.clarityawarenesscoaching.workers.dev |
| Resource | Name | ID |
|---|---|---|
| D1 | newrise-db |
d1a65622-bc04-4599-9d30-8ec7da318536 |
| KV | newrise-kv |
ffd194fed06341918c1dbdff1fabba90 |
| R2 | newrise-assets |
— |
| Worker | newrise-enquiry |
not yet deployed |
| Pages | newrise-sales-training |
not yet created |
| Step | Task | Status |
|---|---|---|
| 0A | D1 newrise-db created |
✅ Done |
| 0B | KV newrise-kv created |
✅ Done |
| 0C | R2 newrise-assets created |
✅ Done |
| 0D | Newrise logo uploaded to R2 as newrise-logo.png |
⬜ You — CF dashboard |
| 0E | KV tp:newrise seeded |
⬜ You — terminal command below |
| 0F | KV invoice counter seeded | ⬜ You — terminal command below |
| 0G | D1 schema created | ⬜ You — terminal command below |
Terminal commands for 0E + 0F + 0G — run in order:
# 0E
wrangler kv key put --namespace-id=ffd194fed06341918c1dbdff1fabba90 "tp:newrise" '{"id":"newrise","name":"Newrise Learning Sdn Bhd","company_id":"201701027170","address":"2-3-11, Bangunan Lip Sin, Lebuh Pekaka 1, Sungai Dua, 11700 Gelugor, Penang, Malaysia","contact_email":"[email protected]","contact_phone":"018-961 1336","account_name":"Newrise Learning Sdn Bhd","bank_name":"Malayan Banking Berhad (Maybank)","account_number":"5070 9567 8082","logo_url":"https://pub-2da76fc8ce74492fb1fc0f168b7ee267.r2.dev/newrise-logo.png","sst_rate":8,"sst_number":"P11-1902-32000013","training_programme_no":"1xx-xx-xx"}'
# 0F
wrangler kv key put --namespace-id=ffd194fed06341918c1dbdff1fabba90 "invoice:newrise:last_number" "1002703"
# 0G
wrangler d1 execute newrise-db --command "CREATE TABLE IF NOT EXISTS enquiries (id INTEGER PRIMARY KEY AUTOINCREMENT, type TEXT, status TEXT DEFAULT 'new', name TEXT, email TEXT, phone TEXT, company TEXT, company_address TEXT, course TEXT, pax TEXT, tentative_date TEXT, venue TEXT, hrdc_option TEXT, message TEXT, source TEXT DEFAULT 'newrise', created_at DATETIME DEFAULT CURRENT_TIMESTAMP); CREATE TABLE IF NOT EXISTS email_events (id TEXT PRIMARY KEY, contact_id TEXT, resend_email_id TEXT, event_type TEXT, metadata TEXT, created_at DATETIME DEFAULT CURRENT_TIMESTAMP);"
| Step | Task | Status |
|---|---|---|
| 1A | Pages project newrise-sales-training created in CF dashboard |
⬜ You |
| 1B | Root dir set to resellers/newrise/sales-training |
⬜ You — during 1A setup |
| 1C | Custom domain newrise.claritysystems.work added to Pages project |
⬜ You |
1A settings:
claritysystems-lobbynewrise-sales-trainingresellers/newrise/sales-training/| Step | Task | Status |
|---|---|---|
| 2A | _data/resellers/newrise.json |
✅ Committed b4e3c00 |
| 2B | workers/newrise-enquiry/ — full worker |
✅ Committed b4e3c00 |
| 2B | workers/newrise-enquiry/assets/template-proforma.html |
✅ In repo — also upload to R2 newrise-assets |
| 2B | workers/newrise-enquiry/assets/template-course-schedule.html |
✅ In repo — also upload to R2 newrise-assets |
| 2C | resellers/newrise/sales-training/index.html |
✅ Committed 9a563c2 |
| 2C | resellers/newrise/sales-training/pricing/index.html |
✅ Committed 9a563c2 |
| 2C | resellers/newrise/sales-training/enquiry/index.html |
⬜ Claude — next session |
| 2C | resellers/newrise/sales-training/confirmation/index.html |
⬜ Claude — next session |
| 2C | resellers/newrise/sales-training/faq/index.html |
⬜ Claude — next session |
R2 uploads still needed (CF dashboard → newrise-assets):
newrise-logo.png (your file)template-proforma.html (from repo: workers/newrise-enquiry/assets/)template-course-schedule.html (from repo: workers/newrise-enquiry/assets/)trainer_profile.pdf (copy from cac-assets R2 — same file)| Step | Task | Status |
|---|---|---|
| 3A | cd workers/newrise-enquiry && npm install && wrangler deploy |
⬜ You — after R2 uploads done |
| 3B | Add secrets in CF dashboard → Workers → newrise-enquiry → Settings |
⬜ You |
Secrets to add (same values as cac-corporate-enquiry):
RESEND_API_KEYTELEGRAM_BOT_TOKENTELEGRAM_CHAT_ID| Check | Status |
|---|---|
| Client receives email with NR-1002704 proforma + schedule attached | ⬜ |
| Joshua receives alert at [email protected] | ⬜ |
| Telegram alert fires | ⬜ |
D1 newrise-db has row with source='newrise' |
⬜ |
| Invoice shows SST 8%, P11-1902-32000013, Training Programme No placeholder, Maybank details | ⬜ |
Five files. All in resellers/newrise/sales-training/.
| File | Status | Notes |
|---|---|---|
index.html |
✅ Done — 9a563c2 | Full landing, all 10 sections, HRDC-only CTA, newrise nav |
pricing/index.html |
✅ Done — 9a563c2 | In-house only, no public tiers, no Stripe, all CTAs → ../enquiry/ |
enquiry/index.html |
⬜ Next session | Grant only. POST to newrise-enquiry.clarityawarenesscoaching.workers.dev |
confirmation/index.html |
⬜ Next session | Remove Stripe copy. "Newrise Learning will be in touch shortly." |
faq/index.html |
⬜ Next session | HRDC grant FAQ. Lovinia edits content after smoke test. |
Pages NOT built: register/ (excluded). about/ and articles/ link out to claritysystems.work.
Images: Both built pages pull from claritysystems.work/assets/img/. Check on first deploy that cross-origin serves correctly.
Read these before building enquiry/confirmation/faq:
workers/newrise-enquiry/src/index.js — exact POST endpoint, field names, expected payloadsales-training/enquiry/index.html — source form to adaptsales-training/confirmation/index.html — source to adaptsales-training/faq/index.html — source to adaptWorker URL: newrise-enquiry.clarityawarenesscoaching.workers.dev
| What | Command |
|---|---|
| Training Programme No | Update training_programme_no in tp:newrise KV |
| FAQ content | Edit faq/index.html, commit, push |
| Logo | Upload new file to R2, update logo_url in KV |
| Item | Owner |
|---|---|
| Upload logo + 2 templates + trainer PDF to R2 | Lovinia |
| Run 0E / 0F / 0G terminal commands | Lovinia |
| Create Pages project (1A / 1B / 1C) | Lovinia |
| Worker deploy + secrets (3A / 3B) | Lovinia |
| Check images load on newrise subdomain after 1C | Lovinia |
| FAQ content edit | Lovinia — after smoke test passes |
| Training Programme No (real value) | Joshua / HRDC |